﻿using Microsoft.AspNetCore.Mvc;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Threading.Tasks;

namespace WebApi.Controllers
{
    public class VideoController : BaseController
    {

        #region 获取逃生技巧列表 List
        /// <summary>
        /// 获取逃生技巧列表
        /// </summary>
        /// <param name="type"></param>
        /// <returns></returns>
        [HttpGet]
        public ActionResult<ResponseDataFile> List()
        {
            ResponseDataFile res = new ResponseDataFile();

            try
            {
                List<string> data = new List<string>();
                data.Add("earthquake.mp4");
                data.Add("fire.mp4");
                res.code = 200;
                res.msg = "查询成功";
                res.file = data;
                return new JsonResult(res);
            }
            catch (Exception ex)
            {
                return this.ControllerExHandler(res, "List", ex);
            }
        }


        #endregion

        #region 轮播图列表 CarouselList
        /// <summary>
        /// 轮播图列表
        /// </summary>
        /// <param name="type"></param>
        /// <returns></returns>
        [HttpGet]
        public ActionResult<ResponseDataFile> CarouselList()
        {
            ResponseDataFile res = new ResponseDataFile();

            try
            {
                List<string> data = new List<string>();
                data.Add("car1.jpeg");
                data.Add("plane2.jpeg");
                data.Add("drowning1.jpeg");
                data.Add("earthquake1.jpeg");
                data.Add("fire1.jpeg");
                data.Add("flood1.jpeg");
                res.code = 200;
                res.msg = "查询成功";
                res.file = data;
                return new JsonResult(res);
            }
            catch (Exception ex)
            {
                return this.ControllerExHandler(res, "CarouselList", ex);
            }
        }


        #endregion

    }
}
